<?php defined('IN_ADMIN') or exit('No permission resources.');?>
<?php include $this->admin_tpl('header', 'admin');?>

<h3 style="padding-left: 20px;padding-top: 10px">
	<?=$data['cn_name']?>——全部资源
	<a href="?m=goods&c=goods&a=index" style="font-size:14px;color: #0000FF"><em>返回上一级</em></a>
</h3>

<div class="subnav">
	<div class="content-menu ib-a blue line-x">
		<a href="?m=goods&c=resources&a=init&id=<?=$id?>" class="on"><em>全部</em></a>
		<span>|</span>
		<a href="?m=goods&c=resources&a=index&source_type=1&id=<?=$id?>" ><em>资讯</em></a>
		<span>|</span>
		<a href="?m=goods&c=resources&a=index&source_type=2&id=<?=$id?>" ><em>视频</em></a>
		<span>|</span>
		<a href="?m=goods&c=resources&a=index&source_type=3&id=<?=$id?>" ><em>图集</em></a>
	</div>
</div>

<div class="pad-lr-10">

	<form name="myform" id="myform" action="" method="post" >
		<div class="table-list">
			<table width="100%">
				<thead>
				<tr>
					<th width="16"><input type="checkbox" value="" id="check_box" onclick="selectall('id[]');"></th>
					<th><?php echo L('title');?></th>
					<th><?php echo L('image_cover');?></th>
					<th><?php echo L('type')?></th>
					<th width="168"><?php echo "发布时间";?></th>
					<th width="200"><?php echo L('operations_manage');?></th>
				</tr>
				</thead>
				<tbody>
				<?php
				if(!empty($list)) {

					foreach ($list as $k=> $r) {
						?>
						<tr>
							<td align="center"><input class="inputcheckbox " name="id[]" value="<?php echo $r['id'];?>" type="checkbox"></td>
							<td align='center' ><?php echo str_cut($r['title'],120);?></td>
							<td align='center' ><?php if($r['image_cover']){ ?><img src="<?php echo $r['image_cover'];?>" height="60" /><?php }else{ echo '<font color="red">（未设置）</font>';}?></td>
							<td align='center' ><?php echo $r['typeName'];?></td>
							<td align='center'><?php echo $r['publish_time'];?></td>
							<td align='center'><a href="?m=goods&c=resources&a=del&id=<?php echo $r['id']?>" onClick="return confirm('<?php echo L('confirm', array('message' => new_addslashes($r['title'])))?>')"><?php echo L('deletebind')?></a></td>

						</tr>
					<?php }
				} else {
					echo "<tr><td colspan='6' style='color:red;font-size:18px;text-align:center;'><span>暂无数据！</span></td></tr>";
				}
				?>
				</tbody>
			</table>
			<div class="btn"><label for="check_box"><?php echo L('selected_all');?>/<?php echo L('cancel');?></label>
				<input type="hidden" value="<?php echo $pc_hash;?>" name="pc_hash">
				<!-- <input type="button" class="button" value="<?php echo L('listorder');?>" onclick="myform.action='?m=admin&c=resources&a=listorder&dosubmit=1&steps=<?php echo $steps;?>';myform.submit();"/> -->
				<input type="button" class="button" value="<?php echo L('deletebind');?>" onclick="myform.action='?m=goods&c=resources&a=del&dosubmit=1&steps=<?php echo $steps;?>';return confirm_delete()"/>
			</div>
			<div id="pages"><?php echo $pages;?></div>
		</div>
	</form>
</div>
<script language="javascript" type="text/javascript" src="<?php echo JS_PATH?>cookie.js"></script>
<script type="text/javascript">

	function confirm_delete(){
		if(confirm('<?php echo L('confirm_delete', array('message' => L('selected')));?>')) $('#myform').submit();
	}
</script>
</body>
</html>